package com.igl.talk.android.client.application;/*
 * @author Adam Wieczorek 
 *
 * 21/04/2014
 *
 * All rights reserved.
 */

import android.app.Application;
import android.util.Log;
import com.igl.talk.android.client.core.service.ChatService;
import com.igl.talk.android.client.core.service.ServiceManager;

public class BaseApplication extends Application {

    private static final String LOG_TAG = BaseApplication.class.getName() + ".class";

    public static final String PREF_EXIT_WITHOUT_ASKING = "com.igl.talk.android.client.application.Preferences.EXIT_WITHOUT_ASKING";

    private boolean isUserRegistered = false;

    private ServiceManager serviceManager;

    @Override
    public void onCreate()
    {
        super.onCreate();
        // Create our service manager and pass it the application context.
        //
        serviceManager = new ServiceManager(this, ChatService.class);
        Log.d(LOG_TAG, "Created service manager: " + serviceManager);
    }

    /**
     * Return the ServiceManager.
     */
    public ServiceManager getServiceManager()
    {
        return serviceManager;
    }

    public boolean isUserRegistered() {
        return isUserRegistered;
    }

    public void setUserRegistered(boolean isUserRegistered) {
        this.isUserRegistered = isUserRegistered;
    }
}
